<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .logo {
            background: url('./images/logo.svg') no-repeat center;
            background-size: cover;
            text-indent: -2220px;
            overflow: hidden;
        }

        .hideText {
            width: 200px;
            font-size: 20px;
            border: 1px solid #ccc;
            text-overflow: ellipsis;
            overflow: hidden;
            text-wrap: nowrap;
        }

        .hideText2 {
            width: 120px;
            font-size: 20px;
            border: 1px solid #ccc;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            line-clamp: 2;
            -webkit-line-clamp: 2;
            overflow: hidden;
            text-overflow: ellipsis;
        }
    </style>
</head>

<body>
    <h1 class="logo">CSS世界</h1>
    <div class="hideText">单行文字超出部分用省略号显示</div>
    <div class="hideText2">多行文字超出部分用省略号显示多行文字超出部分用省略号显示</div>
</body>

</html>